find the occurrence of an integer in the array